.class Lcom/waiqin365/lightapp/cockpit/f;
.super Landroid/webkit/WebViewClient;


# instance fields
.field final synthetic a:Lcom/waiqin365/lightapp/cockpit/CockpitMainActivity;


# direct methods
.method constructor <init>(Lcom/waiqin365/lightapp/cockpit/CockpitMainActivity;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/lightapp/cockpit/f;->a:Lcom/waiqin365/lightapp/cockpit/CockpitMainActivity;

    invoke-direct {p0}, Landroid/webkit/WebViewClient;-><init>()V

    return-void
.end method


# virtual methods
.method public onPageFinished(Landroid/webkit/WebView;Ljava/lang/String;)V
    .locals 1

    invoke-super {p0, p1, p2}, Landroid/webkit/WebViewClient;->onPageFinished(Landroid/webkit/WebView;Ljava/lang/String;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/cockpit/f;->a:Lcom/waiqin365/lightapp/cockpit/CockpitMainActivity;

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/cockpit/CockpitMainActivity;->dismissProgressDialog()V

    return-void
.end method

.method public onPageStarted(Landroid/webkit/WebView;Ljava/lang/String;Landroid/graphics/Bitmap;)V
    .locals 2

    invoke-super {p0, p1, p2, p3}, Landroid/webkit/WebViewClient;->onPageStarted(Landroid/webkit/WebView;Ljava/lang/String;Landroid/graphics/Bitmap;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/cockpit/f;->a:Lcom/waiqin365/lightapp/cockpit/CockpitMainActivity;

    const-string/jumbo v1, ""

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/cockpit/CockpitMainActivity;->showProgressDialog(Ljava/lang/String;)V

    return-void
.end method

.method public shouldOverrideUrlLoading(Landroid/webkit/WebView;Ljava/lang/String;)Z
    .locals 7

    const v6, 0x7f040022

    const v5, 0x7f040021

    const/4 v4, 0x1

    const-string/jumbo v0, "title="

    invoke-virtual {p2, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_1

    new-instance v1, Landroid/content/Intent;

    iget-object v0, p0, Lcom/waiqin365/lightapp/cockpit/f;->a:Lcom/waiqin365/lightapp/cockpit/CockpitMainActivity;

    const-class v2, Lcom/waiqin365/lightapp/cockpit/CockpitMainActivity;

    invoke-direct {v1, v0, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string/jumbo v0, "openurl"

    invoke-static {p2}, Lorg/apache/cordova/util/Util;->addLanguageFormatForUrl(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v0, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const-string/jumbo v0, "showFullScreen"

    invoke-virtual {v1, v0, v4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    :try_start_0
    const-string/jumbo v0, "title="

    invoke-virtual {p2, v0}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v0

    add-int/lit8 v0, v0, 0x6

    invoke-virtual {p2, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v0

    const-string/jumbo v2, "utf-8"

    invoke-static {v0, v2}, Ljava/net/URLDecoder;->decode(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    const-string/jumbo v2, "title"

    invoke-virtual {v1, v2, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
    :try_end_0
    .catch Ljava/io/UnsupportedEncodingException; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/cockpit/f;->a:Lcom/waiqin365/lightapp/cockpit/CockpitMainActivity;

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/cockpit/CockpitMainActivity;->startActivity(Landroid/content/Intent;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/cockpit/f;->a:Lcom/waiqin365/lightapp/cockpit/CockpitMainActivity;

    invoke-virtual {v0, v6, v5}, Lcom/waiqin365/lightapp/cockpit/CockpitMainActivity;->overridePendingTransition(II)V

    :cond_0
    :goto_1
    return v4

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/io/UnsupportedEncodingException;->printStackTrace()V

    goto :goto_0

    :cond_1
    const-string/jumbo v0, "sysapp/achievement/h5/v3/question.html"

    invoke-virtual {p2, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_2

    new-instance v0, Landroid/content/Intent;

    iget-object v1, p0, Lcom/waiqin365/lightapp/cockpit/f;->a:Lcom/waiqin365/lightapp/cockpit/CockpitMainActivity;

    const-class v2, Lcom/waiqin365/lightapp/cockpit/CockpitMainActivity;

    invoke-direct {v0, v1, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string/jumbo v1, "openurl"

    invoke-static {p2}, Lorg/apache/cordova/util/Util;->addLanguageFormatForUrl(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const-string/jumbo v1, "title"

    iget-object v2, p0, Lcom/waiqin365/lightapp/cockpit/f;->a:Lcom/waiqin365/lightapp/cockpit/CockpitMainActivity;

    const v3, 0x7f08011f

    invoke-virtual {v2, v3}, Lcom/waiqin365/lightapp/cockpit/CockpitMainActivity;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    iget-object v1, p0, Lcom/waiqin365/lightapp/cockpit/f;->a:Lcom/waiqin365/lightapp/cockpit/CockpitMainActivity;

    invoke-virtual {v1, v0}, Lcom/waiqin365/lightapp/cockpit/CockpitMainActivity;->startActivity(Landroid/content/Intent;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/cockpit/f;->a:Lcom/waiqin365/lightapp/cockpit/CockpitMainActivity;

    invoke-virtual {v0, v6, v5}, Lcom/waiqin365/lightapp/cockpit/CockpitMainActivity;->overridePendingTransition(II)V

    goto :goto_1

    :cond_2
    const-string/jumbo v0, "wq:share:timeline"

    invoke-virtual {p2, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_4

    iget-object v0, p0, Lcom/waiqin365/lightapp/cockpit/f;->a:Lcom/waiqin365/lightapp/cockpit/CockpitMainActivity;

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/cockpit/CockpitMainActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    const v1, 0x7f0808b9

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v0

    const-string/jumbo v1, "com.fiberhome.imobii.client"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-nez v1, :cond_3

    const-string/jumbo v1, "com.fiberhome.waiqin365.client"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    :cond_3
    iget-object v0, p0, Lcom/waiqin365/lightapp/cockpit/f;->a:Lcom/waiqin365/lightapp/cockpit/CockpitMainActivity;

    iget-object v1, p0, Lcom/waiqin365/lightapp/cockpit/f;->a:Lcom/waiqin365/lightapp/cockpit/CockpitMainActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/cockpit/CockpitMainActivity;->c(Lcom/waiqin365/lightapp/cockpit/CockpitMainActivity;)Landroid/webkit/WebView;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/waiqin365/lightapp/cockpit/CockpitMainActivity;->a(Lcom/waiqin365/lightapp/cockpit/CockpitMainActivity;Landroid/view/View;)V

    goto :goto_1

    :cond_4
    iget-object v0, p0, Lcom/waiqin365/lightapp/cockpit/f;->a:Lcom/waiqin365/lightapp/cockpit/CockpitMainActivity;

    invoke-virtual {v0, p2}, Lcom/waiqin365/lightapp/cockpit/CockpitMainActivity;->a(Ljava/lang/String;)V

    invoke-virtual {p1, p2}, Landroid/webkit/WebView;->loadUrl(Ljava/lang/String;)V

    goto :goto_1
.end method
